//
//  SecondViewController.m
//  Test
//
//  Created by 杨德龙 on 17/7/21.
//  Copyright © 2017年 杨德龙. All rights reserved.
//

#import "SecondViewController.h"

@interface SecondViewController ()

@end

@implementation SecondViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self stringMethodExchangeSecond];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


/**
 对比第一个 string  我们测试发现如果改变运行期的方法 会产生永久的作用  这种作用会造成 很多的不好找的bug 不建议使使用
 */
- (void)stringMethodExchangeSecond
{
    NSLog(@"second view controller.....  ");
    // 我们需要测试 这段代码是否陷入死循环
    NSString *string=@"ThIs iS tHe StRiNg";
    NSString *lowercaseString=[string lowercaseString];
    NSLog(@"lowercaseString = %@",lowercaseString);
    
    NSString *uppercaseString=[string uppercaseString];
    NSLog(@"uppercaseString = %@",uppercaseString);
}


/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
